#include<iostream>
#include<string>
#include<vector>
using namespace std;
string s;
int n;
void update(char& c)
{
	if (c == 'W')c = 'B';
	else {
		c = 'W';
	}
}
bool check(char c)
{
	vector<int>ans;
	string temp = s;
	for (int i = 0; i < n - 1; i++) {
		if (temp[i] != c) {
			update(temp[i]);
			update(temp[i + 1]);
			ans.push_back(i);
		}
	}
	if (temp.back() != c) {
		return 0;
	}
	cout << ans.size() << endl;
	for (int x : ans) {
		cout << x + 1 << " ";
	}
	if (ans.size()) {
		cout << endl;
	}
	return 1;
}
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n >> s;
		if (!check('B') && !check('W')) {
			cout << -1 << endl;
		}
	}
	return 0;
}